1. Field of the Invention
The present invention is directed to computer network communications, and more particularly to a stream-based protocol that can be efficiently interfaced with a transaction-based protocol.
2. Description of the Related Art
With the advent of computers in the workplace, local area networks (LANs) have grown increasingly valuable for businesses as their dependency upon fast and efficient dissemination of information grows. One commonly employed type of network generally comprises at least one server and a plurality of clients (e.g., workstations).
An exemplary conventional client/server network 100 is illustrated in FIG. 1. A first server 110a is connected to a plurality of client workstations 120. The architecture for connecting the clients and servers can be Ethernet or token ring, for example. The server 110a is able to control access to a resource (e.g., a hard disk or printer) and serves as a host to the client workstations 120. Each client workstation 120 makes requests to the server 110a for access to files, programs or peripheral devices that are controlled by the server. A client/server network, such as the network illustrated in FIG. 1, can also be connected to another client/server network having a server 110b. The various networks transfer information to one another through devices such as bridges and gateways.
A network uses protocols to quickly and efficiently transmit data from one location to another. A protocol is a set of predefined rules that govern how two or more connected processors communicate and interact to exchange data. Protocols are distinguished by several different properties such as the xe2x80x9clayerxe2x80x9d at which the protocol operates, and the network architecture for which the protocol is designed. Additionally, protocols can be synchronous or asynchronous, connection-oriented or connectionless, character- or bit-oriented and stream-based or transaction-based.
When implementing a protocol within a network, the choice of whether the system operates with a stream-based protocol or a transaction-based protocol determines how data will be transmitted from one location to another within the network. An example of a stream-based protocol is the transmission control protocol (TCP) which has no restrictions on the amount of data sent from one location to another within a network. Standard TCP implementations attempt to optimize the bulk transfer of large amounts of data over a network. This is achieved by buffering data being sent into large data groups each having a size equal to the maximum amount of data that can be transmitted as a unit, which is known as a Maximum Transmission Unit (MTU). This technique reduces the number of packets needed to send data to a destination processor.
An example of a transaction-based protocol is the AppleTalk File Protocol (AFP), which moves data from one location to another based upon discrete requests and discrete responses. In response to each discrete request, the server normally sends a packet with a specific amount of data. As a result, many more discrete packets of data can be required to send a message than when a stream-based protocol is used to send data.
While it is evident from the above description that transaction-based and stream-based protocols are fundamentally different, attempts have been made to use both protocols in conjunction with one another, where the transaction-based protocol is layered on top of the stream based protocol. In this case a data transmission is subject to both protocols. When using a transaction-based protocol in conjunction with a standard stream-based protocol, certain performance deficiencies are exposed. For example, unwanted delays in data transmission are introduced into the network when a stream-based protocol is used for transaction-oriented data transfers. When data is being sent from one location to another, the stream-based protocol causes the data to be buffered into MTU packets before sending each segment of data. Complete MTU packets are sent continually until the last segment of data, which may be less than an MTU. If the remaining data to be sent in response to a transaction-based request is less than a complete MTU, the stream-based protocol will cause it to be held in the buffer in anticipation of more data being sent. As a result, the buffered data will not be sent until a timer within the host processor expires. The delay introduced by this sequence can result in a severe restriction on the number of transactions that can be processed over a period of seconds or minutes.
Additionally, a stream-based protocol, such as TCP, inherently reduces the efficiency of data transmission. After one or more segments of data are transmitted, the client is required to send an acknowledgment packet to the sending processor. The acknowledgment packet indicates to the server the last contiguous segment that has been properly received by the client, so that the server can resend any packets that may be missing. This results in a large ratio of acknowledgment packets being sent per data packets received, resulting in less than optimal use of the network.
Due to the aforementioned limitations, there is a need for an enhanced stream-based network protocol implementation that optimizes performance and network utilization. Additionally, there is a need for the transactions to be more efficient when a stream-based network protocol is employed with transaction-based data transmission.
In accordance with an exemplary embodiment of the present invention, to compensate for limitations that arise when a transaction-based protocol is used together with stream-based protocols, the stream-based protocol is modified to take advantage of certain characteristics of transaction-based protocols.
In one aspect of the present invention, in order to compensate for data transmission delays, the modified stream-based protocol uses knowledge of the amount of data being received from a server to anticipate when the last data segment is expected from the server. The client can send the server a preemptive acknowledgment packet to force the server to immediately send any buffered data segment to the client, rather than waiting for a time period to expire before data transmission. As a result, the number of transactions that can be processed over a given time is increased.
In accordance with yet another aspect of the present invention, in order to compensate for inefficient network utilization, the modified stream-based protocol uses knowledge of the transaction-based protocol to anticipate the amount of data being returned from the server for each client request. As a result, the stream-based protocol located at the client can forego the usual acknowledgment packet after every few data segments, and send acknowledgments only when required to complete the transmission. This results in far fewer segments being sent from the client to the server, and thus a much more optimal use of the intervening network.